package view;

import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;

import controller.ApplicationController;

public class PopUpMenu extends JPopupMenu {
    private JMenuItem anItem;
    private JMenuItem newItem;
	private JMenuItem deleteItem;
	private JMenuItem cancelItem;
    public PopUpMenu(ApplicationView aw, ApplicationController ac){
    	
    	newItem = new JMenuItem("New");
		deleteItem = new JMenuItem("Delete");
		cancelItem = new JMenuItem("Cancel");
		add(newItem);
		add(deleteItem);
		add(cancelItem);
		newItem.addActionListener(ac.getNewButtonActionListener(aw));
		deleteItem.addActionListener(ac.getDeleteButtonActionListener(aw));
		cancelItem.addActionListener(ac.getCancelButtonActionListener(aw));
		cancelItem.setEnabled(false);
    }
}